package com.saileijieji.mymvp.http;



import com.saileijieji.mymvp.bean.GetMessageCenterBean;
import com.saileijieji.mymvp.bean.LoginBean;
import com.saileijieji.mymvp.bean.TypeSelectBean;

import java.util.List;

import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Part;
import rx.Observable;

/**
 * 存放各种网络请求的类
 *
 * @author fym
 */
public interface ApiManager {

    String BASE_URL = "http://47.104.68.24:8081/interface/"; //http://192.168.10.199:8082/tms/a/
    String BASE_URL1 = "http://dev.saileikeji.com:10030/ebr/"; //http://192.168.10.199:8082/tms/a/

    @GET("getMessageCenter")
    Observable<BaseResponse<List<GetMessageCenterBean>>> getMessageCenter();
//    /**
//     * 首页接口
//     */
//    @FormUrlEncoded
//    @POST("homePage")
//    Observable<BaseResponse<HomePageBean>> homePage(
//            @Field("location") String location
//    );

    /**
     * 登录
     * @param loginName
     * @param passWord
     * @return
     */
    @FormUrlEncoded
    @POST("user/login")
    Observable<BaseResponse<LoginBean>> getLogin(
        @Field("loginName") String loginName,
        @Field("passWord") String passWord
    );

    /**
     * 巡检上传页面下拉列表 — 巡检设备
     * @return
     */
    @GET("inspection/typeSelect")
    Observable<BaseResponse<TypeSelectBean>> typeSelect();

    /**
     * 巡检上传页面下拉列表 — 地点
     * @return
     */
    @GET("inspection/areaSelect")
    Observable<BaseResponse<TypeSelectBean>> areaSelect(
            @Part String parentId
    );
}

